package ooday2zy;

public class Animal {
    String name;
    int age;
    String color;
    Animal(String name,int age,String color){
        this.age=age;
        this.color=color;
        this.name=name;
    }
    void eat(){
        System.out.println(age+"的"+name+"是"+color+"的，他在吃饭");
    }
    void  drink() {
        System.out.println(age + "的" + name + "是" + color + "的，他在喝水");
    }















    /*
    String name;
    int age;
    String color;
    Animal(String name,int age,String color){
        this.age=age;
        this.color=color;
        this.name=name;
    }
    void eat(){
                System.out.println(age+"的"+name+"是"+color+"的，他在吃饭");
    }
    void  drink(){
        System.out.println(age+"的"+name+"是"+color+"的，他在喝水");

    }

     */
}
